var express = require('express')
const multer  = require('multer')
const upload = multer({ dest: 'public/uploads/' })
const UserController = require('../controller/UserController')
var UserRouter = express.Router()
UserRouter.get("/admin/users",UserController.getList)
UserRouter.post("/admin/users",UserController.addList)
UserRouter.delete("/admin/users/:id",UserController.deleteList)
UserRouter.put("/admin/users/:id",UserController.updateList)
UserRouter.post("/admin/users/login",UserController.login)
UserRouter.post("/admin/users/:id/upload",upload.single('file'),UserController.upload)
module.exports = UserRouter